﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OJobList.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.MacModel.OJobList" %>

<form id="pagerForm" method="post" action="MacModel/OJobList.aspx">
<input type="hidden" name="CommonFiled" value="<%=CommonFiled %>" />
<input type="hidden" name="CommonValue" value="<%=CommonValue %>" />
<input type="hidden" name="MachineType" value="<%=MachineType %>" />
<input type="hidden" name="DownlineDateFrom" value="<%=DownlineDateFrom %>" />
<input type="hidden" name="DownlineDateTo" value="<%=DownlineDateTo %>" />
<input type="hidden" name="beforeInStorageDate" value="<%=beforeInStorageDate %>" />
<input type="hidden" name="Remark" value="<%=Remark %>" />
<input type="hidden" name="orderField" value="<%=orderField %>" />
<input type="hidden" name="orderDirection" value="<%=orderDirection %>" />
<input type="hidden" name="pageNum" value="1" />
<input type="hidden" name="numPerPage" value="<%=numPerPage %>" />
</form>
<form id="OJobListform1" runat="server" method="post" action="MacModel/OJobList.aspx" onsubmit="return navTabSearch(this);">
 <div class="panelBar" style=" border-width:0px!important;">
        <ul class="toolBar">
          <% if (HasPower(IHISCETeim.Web.Permission.新增))
             {%>
            <li><a class="add" href="MacModel/OJobAdd.aspx" target="dialog" rel="OJobAdd"   max=false  mask=true  maxable=false  minable=false  resizable=true drawable=true  width="800" height="400"  title="添加作业确认表"><span>添加</span></a></li>
           <%} %>
            <% if (HasPower(IHISCETeim.Web.Permission.删除))
               {%>
            <li><a class="delete" href="sysAjaxDone.ashx?ajaxmethod=DeleteJob&SerialNumber={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
           <%} %>
           <% if (HasPower(IHISCETeim.Web.Permission.修改))
              {%>
            <li><a class="edit" href="MacModel/OJobEdit.aspx?SerialNumber={sid_user}" rel="OJobEdit" target="dialog" title="修改作业确认表" max=false  mask=true  maxable=false  minable=false  resizable=true drawable=true  width="800" height="400"><span>修改</span></a></li>
          <%} %>
          <% if (HasPower(IHISCETeim.Web.Permission.导出))
             {%>
            <li><a class="add" href="MacModel/ExeclOJobList.aspx?CommonFiled=<%=CommonFiled %>&CommonValue=<%=CommonValue %>&MachineType=<%=MachineType %>&DownlineDateFrom=<%=DownlineDateFrom %>&DownlineDateTo=<%=DownlineDateTo %>&orderField=<%=orderField %>&orderDirection=<%=orderDirection %>" target="_blank"   title="导出"><span>导出</span></a></li>
           <%} %>
           <ul class="toolBar">
         <%-- <% if (HasPower(IHISCETeim.Web.Permission.机器库存一览表_进口新增))
             {%>
            <li><a class="add" href="MacModel/OJobJinKouAdd.aspx" target="dialog" rel="OJobJinKouAdd"   max=false  mask=true  maxable=false  minable=false  resizable=true drawable=true  width="800" height="400"  title="添加进口机"><span>添加进口机</span></a></li>
           <%} %>--%>
        </ul>
       
    </div>
<div class="tabs" style=" border-width:0px!important;" currentIndex="<%=MachineType=="55NSL"?"1":MachineType=="65NS"?"2":MachineType=="65NSL"?"3":MachineType=="68NS"?"4":MachineType=="80NS"?"5":MachineType=="55NS"?"6":MachineType=="60NS"?"7":MachineType=="55VXL"?"8":MachineType=="80NC"?"9":MachineType=="80NX"?"10":MachineType=="40NS"?"11":MachineType=="100NS"?"12":MachineType=="100NST"?"13":MachineType=="18VX"?"14":"0" %>" eventType="click">
    <div class="tabsHeader" style=" border-width:0px!important;">
		<div class="tabsHeaderContent" style=" border-width:0px!important;">
			<ul>
                <li><a href="javascript:;" onclick="$('#OJobList_MachineType').val('');navTabSearch(OJobListform1)"><span>全部</span></a></li>
				<li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('55NSL');navTabSearch(OJobListform1)"><span>55NSL</span></a></li>
				<li><a href="javascript:;" onclick="$('#OJobList_MachineType').val('65NS');navTabSearch(OJobListform1)"><span>65NS</span></a></li>
                <li><a href="javascript:;" onclick="$('#OJobList_MachineType').val('65NSL');navTabSearch(OJobListform1)"><span>65NSL</span></a></li>
                <li><a href="javascript:;" onclick="$('#OJobList_MachineType').val('68NS');navTabSearch(OJobListform1)"><span>68NS</span></a></li>
                <li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('80NS');navTabSearch(OJobListform1)"><span>80NS</span></a></li>
                <li><a href="javascript:;" onclick="$('#OJobList_MachineType').val('55NS');navTabSearch(OJobListform1)"><span>55NS</span></a></li>
                <li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('60NS');navTabSearch(OJobListform1)"><span>60NS</span></a></li>
                <li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('55VXL');navTabSearch(OJobListform1)"><span>55VXL</span></a></li>
                <li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('80NC');navTabSearch(OJobListform1)"><span>80NC</span></a></li>
                <li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('80NX');navTabSearch(OJobListform1)"><span>80NX</span></a></li>
                <li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('40NS');navTabSearch(OJobListform1)"><span>40NS</span></a></li>
                <li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('100NS');navTabSearch(OJobListform1)"><span>100NS</span></a></li>
                <li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('100NST');navTabSearch(OJobListform1)"><span>100NST</span></a></li>
                <li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('18VX');navTabSearch(OJobListform1)"><span>18VX</span></a></li>
               <%-- <li ><a href="javascript:;" onclick="$('#OJobList_MachineType').val('JK');navTabSearch(OJobListform1)"><span>进口机</span></a></li>--%>
			</ul>
		</div>
	</div>
	<div class="tabsContent" style=" display:none;"></div>
</div>
<div class="pageHeader">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    查询条件：
                </td>
                <td>
                <select name="CommonFiled" class="combox">       
                         <option value="AgentName" <%=CommonFiled=="AgentName"?"selected":"" %>>经销商</option>               
                        <option value="SerialNumber" <%=CommonFiled=="SerialNumber"?"selected":"" %>>机号</option>
                        <option value="PName" <%=CommonFiled=="PName"?"selected":"" %>>项目</option>
                        <option value="EngineNumber" <%=CommonFiled=="EngineNumber"?"selected":"" %>>发动机号</option>
                        <option value="GPSNumber" <%=CommonFiled=="GPSNumber"?"selected":"" %>>GPS号码</option>
                    </select>
                </td>
                <td>
                    等于：
                        <input name="CommonValue" type="text" value="<%=CommonValue %>" />
                </td>
                <td>
                     在:
                </td>
                <td>                   
                    <input name="beforeInStorageDate" class="date" type="text" value="<%=beforeInStorageDate %>"  />
                </td>
                <td>
                之后出库
                </td>
                <td>
                    备注： <input name="Remark" type="text" value="<%=Remark %>" />
                </td>
                <td>
                    <input type="hidden" id="OJobList_MachineType" name="MachineType" value="<%=MachineType %>" />
                    <div class="subBar">
                    <ul>
                        <li>
                            <div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
                        </li>
                    </ul>
                </div>
                </td>
            </tr>
        </table>
        
    </div>
</div>
<div class="pageContent" >      
    
    <%if (MachineType == "JK")
      { %>
        <table class="table" width="100%" layouth="141" >
            <thead>
            <tr>
                <th>机型</th>
                <th>机号</th>
                <th>下线时间</th>
                <th>入库时间</th>
            </tr>
            </thead>
            <asp:repeater id="rpMenuJK" runat="server">
            <HeaderTemplate>         
                <tbody>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td><%# Eval("MachineType").ToString() == "18VX" ? "17VX" : Eval("MachineType").ToString() == "20VXT" ? "19VXT" : Eval("MachineType").ToString()%></td>
                    <td><%# Eval("SerialNumber")%></td>
                    <td><%# Eval("DownlineDate")%></td>
                    <td><%# Eval("InStorageDate")%></td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </tbody>
            </FooterTemplate>
            </asp:repeater>
        </table>
      <%}
      else
      { %>
        <table class="table" width="1500" layouth="141" >
        <thead >
            <tr  >
               <%-- <th  width="60px" orderField="PNAME" class="asc" >项目</th>--%>
                <th   width="70px" orderField="SerialNumber" class="asc" >
                    机号
                </th>
                <th width="60px" align="center" >
                    发动机号
                </th>
                <th width="70px" orderField="DownlineDate" class="asc" >
                    下线日期
                </th>
                <th width="60px" align="center">
                    GPS安装
                </th>
                <th width="70px" align="left" orderField="InStorageDate" class="asc">
                    入库日期
                </th>
                <th width="60px" >
                    GPS号码
                </th>
                <th width="70px" orderField="OnlineDate" class="asc">
                    出库日期
                </th>
                <th width="60px" align="center">
                    GPS出库
                </th>
                <th width="60px" align="center" orderField="MACStock" class="asc" >
                    整机库存
                </th>
                <th  width="60px" align="center" orderField="GPSStock" class="asc">
                    GPS库存
                </th>
                <th width="60px" orderField="OutStockType" class="desc" >
                    出库形式
                </th>
                <th width="70px" orderField="AgentName" class="desc" >
                    经销商
                </th>
                 <th width="70px" >
                    最后出库地点
                </th>
                <th >
                    备注
                </th>
            </tr>
        </thead>

        <asp:repeater id="rpMenu" runat="server">
        <HeaderTemplate>         
        <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr target="sid_user" rel="<%# Eval("SerialNumber") %>" action="MacModel/OJobList.aspx?ajaxmethod=editjob&JobId=<%# Eval("JobId") %>">				        
				<%--<td>
                     <a target="navTab" title="查看作业日报表"  style="color:Green;" rel="viewdailyjob" fresh="true" href="MacModel/ODailyList.aspx?SerialNumber=<%# Eval("PNAME") %>"><%# Eval("PNAME")%></a>
                </td>--%>
                <td  >
                    
                    <a target="navTab" title="查看初加工物管制票" style="color:<%# Convert.ToInt32(Eval("ControlTicketNum"))>0?"Red":"" %>;" rel="viewOControlTicketList" fresh="true" href="MacModel/OControlTicketList.aspx?SerialNumber1=<%# Eval("SerialNumber") %>"><%# Eval("SerialNumber") %></a>
                </td>                        
				<td><%# Eval("EngineNumber")%></td>
                <td><%# Eval("DownlineDate") is DBNull ? "" : Convert.ToDateTime(Eval("DownlineDate")).ToString("yyyy-MM-dd")%></td>
				<td><%# Eval("GPSIsSetUp") is DBNull ? "" : Convert.ToBoolean(Eval("GPSIsSetUp")) ? "有" : "<b style='color:red;'>无</b>"%></td>
                <td><%# Eval("InStorageDate") is DBNull ? "" : Convert.ToDateTime(Eval("InStorageDate")).ToString("yyyy-MM-dd")%></td>
                <td><%# Eval("GPSNumber")%></td>
                <td><%# Eval("OnlineDate") is DBNull ? "" : Convert.ToDateTime(Eval("OnlineDate")).ToString("yyyy-MM-dd")%></td>
                <td><%# Eval("GPSOutStorage") is DBNull ? "" : Convert.ToBoolean(Eval("GPSOutStorage")) ? "是" : "<b style='color:red;'>否</b>"%></td>
                <td><%# Eval("MACStock") is DBNull ? "" : Convert.ToBoolean(Eval("MACStock")) ? "是" : "<b style='color:red;'>否</b>"%></td>
                <td><%# Eval("GPSStock") is DBNull ? "" : Convert.ToBoolean(Eval("GPSStock")) ? "是" : "<b style='color:red;'>否</b>"%></td>
                <td><%# Eval("OutStockType")%></td>
                <td><%# Eval("AgentName")%></td>
                 <td><%# Eval("LastOutStack")%></td>
                <td>                    
                <%# Eval("Remark")%>
                </td>
               
			</tr>
        </ItemTemplate>
        <FooterTemplate>
            <tr class="totalitemtr">
        <%--    <td widtd="60"></td>--%>
            <td   widtd="70px" >
                &nbsp;
            </td>                      
            <td widtd="60px" >
                &nbsp;
            </td>
            <td widtd="70px" >
                <b>合计:</b>
            </td>
            <td widtd="60px" align="center" >
                <%=GetCountByFiled("GPSIsSetUp")%></b>台
            </td>
            <td widtd="70px" >
                &nbsp;
            </td>
                <td widtd="60px">
                &nbsp;
            </td>
            <td widtd="70px" >
                &nbsp;
            </td>
            <td widtd="60px" align="center">
                <%=GetCountByFiled("GPSOutStorage")%>台
            </td>
            <td widtd="60px" align="center">
                <%=GetCountByFiled("MACStock")%>台
            </td>
            <td   widtd="60px" align="center">
                <%=GetCountByFiled("GPSStock")%>台
            </td>
            <td widtd="60px" >
                &nbsp;
            </td>
            <td widtd="70px" >
                &nbsp;
            </td>
            <td  >
                &nbsp;
            </td>
            <td  >
                &nbsp;
            </td>
        </tr>
            </tbody>
        </FooterTemplate>
    </asp:repeater>
    </table>
    <%} %> 
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})" >
                <%=SetnumPerPage() %>
            </select>
            <span>条，共<%=TotalCount%>条</span>
        </div>
        <div class="pagination" targettype="navTab" totalcount="<%=TotalCount%>" numperpage="<%=numPerPage %>"
            pagenumshown="10" currentpage="<%=pageNum %>">
        </div>
    </div>
</div>
</form>
